package wu.example.orderserver.invoker;

import org.apache.dubbo.rpc.RpcException;
import org.apache.dubbo.rpc.cluster.Directory;
import org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker;
import org.apache.dubbo.rpc.cluster.support.wrapper.AbstractCluster;

/**
 * @author benjamin_5
 * @Description
 * @date 2024/8/23
 */
public class MyDubboCluster extends AbstractCluster {

    public static final String NAME = "my";

    @Override
    protected <T> AbstractClusterInvoker<T> doJoin(Directory<T> directory) throws RpcException {
        // 创建具体的集群策略
        return new MyClusterInvoker<>(directory);
    }
}
